#ifndef DESIGN_COMPOSITE_H_
#define DESIGN_COMPOSITE_H_

#include <string>
#include <vector>

namespace composite{
    class MenuComponent
    {
    public:
        virtual void MenuPrint() = 0;
    };

    class Menu :public MenuComponent
    {
    public:
        Menu(std::string n, std::string d):m_name(n),m_descri(d){}
    public:
        virtual void MenuPrint();
    public:
        void Add(MenuComponent* m);
    private:
        std::string m_name;
        std::string m_descri;
        std::vector<MenuComponent*> m_menus;
    };

    class MenuItem:public MenuComponent
    {
    public:
        MenuItem(std::string n, std::string d, bool v, double p):m_name(n),m_descri(d),m_bvegetarian(v),m_price(p){}
    public:
        virtual void MenuPrint();
    private:
        std::string m_name;
        std::string m_descri;
        bool m_bvegetarian;
        double m_price;
    };

    class Waitress
    {
    public:
        Waitress(MenuComponent* all):m_allmenus(all){}
    public:
        void PrintMenu();
    private:
        MenuComponent* m_allmenus;
    };
}

#endif // DESIGN_COMPOSITE_H_
